package csnet.openflow.config;

import org.json.JSONException;
import org.json.JSONObject;

import csnet.openflow.component.controller.ConstantLatencyController;
import csnet.openflow.component.controller.Controller;

public class ControllerInterpreter {
    private static final String LATENCY = "latency";

    public static Controller interpreter(JSONObject json) throws JSONException {
        int latency = json.getInt(LATENCY);
        return new ConstantLatencyController(latency);
    }
}
